<%-- 
    Document   : testOnline
    Created on : 16 Nov 12, 12:45:46
    Author     : user
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>SOAL TEST ONLINE</title>

    <h1> Test Online SMA Sanata Dharma </h1>
    <hr/>
    <p> Kerjakan soal-soal dibawah ini dengan teliti dan benar. Pilih jawaban yang anda anggap paling benar. Waktu yang diberikan 120 menit. Selamat mengerjakan!</p>
</head>
<hr/>
<body>
    <form action="konfirmasiTest.jsp" method="post">
        <h1> konfirmasi Nama : <input type = "text" name ="nama" size="10"></h1> 
        <p> Kerjakan soal dibawah ini dengan mengklik button yang ada.</p>
         <%
                model.DataBaseConnection conn = new model.DataBaseConnection();
            %>
            <%

                try {
                    String query = "select * from tablesoal where no = 1";
                    java.sql.Statement statement = conn.getConnection().createStatement();
                    java.sql.ResultSet result = statement.executeQuery(query);

                    while (result.next()) {
                        out.println("" + result.getString("no") + "<br>");
                        out.println("" + result.getString("soal") + "<br>");
                        out.println("" + result.getString("pilihanA") + "<br>");
                        out.println("" + result.getString("pilihanB") + "<br>");
                        out.println("" + result.getString("pilihanC") + "<br>");
                        out.println("" + result.getString("pilihanD") + "<br>");

                    }
                    statement.close();
                } catch (Exception ex) {
                    out.println("message: " + ex.getMessage());
                }
            %>
        <br> jawaban : <input type = "text" name ="jawaban1" size="70"></br>

        <br> 
            <%

                try {
                    String query = "select * from tablesoal where no = 2";
                    java.sql.Statement statement = conn.getConnection().createStatement();
                    java.sql.ResultSet result = statement.executeQuery(query);

                    while (result.next()) {
                        out.println("" + result.getString("no") + "<br>");
                        out.println("" + result.getString("soal") + "<br>");
                        out.println("" + result.getString("pilihanA") + "<br>");
                        out.println("" + result.getString("pilihanB") + "<br>");
                        out.println("" + result.getString("pilihanC") + "<br>");
                        out.println("" + result.getString("pilihanD") + "<br>");

                    }
                    statement.close();
                } catch (Exception ex) {
                    out.println("message: " + ex.getMessage());
                }
            %>
        <br> jawaban : <input type = "text" name ="jawaban2" size="70"></br>

        <br>  
            <%

                try {
                    String query = "select * from tablesoal where no = 3";
                    java.sql.Statement statement = conn.getConnection().createStatement();
                    java.sql.ResultSet result = statement.executeQuery(query);

                    while (result.next()) {
                        out.println("" + result.getString("no") + "<br>");
                        out.println("" + result.getString("soal") + "<br>");
                        out.println("" + result.getString("pilihanA") + "<br>");
                        out.println("" + result.getString("pilihanB") + "<br>");
                        out.println("" + result.getString("pilihanC") + "<br>");
                        out.println("" + result.getString("pilihanD") + "<br>");

                    }
                    statement.close();
                } catch (Exception ex) {
                    out.println("message: " + ex.getMessage());
                }
            %>
        <br> jawaban : <input type = "text" name ="jawaban3" size="70"></br>

        <br> 
            <%

                try {
                    String query = "select * from tablesoal where no = 4";
                    java.sql.Statement statement = conn.getConnection().createStatement();
                    java.sql.ResultSet result = statement.executeQuery(query);

                    while (result.next()) {
                        out.println("" + result.getString("no") + "<br>");
                        out.println("" + result.getString("soal") + "<br>");
                        out.println("" + result.getString("pilihanA") + "<br>");
                        out.println("" + result.getString("pilihanB") + "<br>");
                        out.println("" + result.getString("pilihanC") + "<br>");
                        out.println("" + result.getString("pilihanD") + "<br>");

                    }
                    statement.close();
                } catch (Exception ex) {
                    out.println("message: " + ex.getMessage());
                }
            %>
        <br> jawaban : <input type = "text" name ="jawaban4" size="70"></br>

        <br>  
            <%

                try {
                    String query = "select * from tablesoal where no = 5";
                    java.sql.Statement statement = conn.getConnection().createStatement();
                    java.sql.ResultSet result = statement.executeQuery(query);

                    while (result.next()) {
                        out.println("" + result.getString("no") + "<br>");
                        out.println("" + result.getString("soal") + "<br>");
                        out.println("" + result.getString("pilihanA") + "<br>");
                        out.println("" + result.getString("pilihanB") + "<br>");
                        out.println("" + result.getString("pilihanC") + "<br>");
                        out.println("" + result.getString("pilihanD") + "<br>");

                                             }
                    statement.close();
                } catch (Exception ex) {
                    out.println("message: " + ex.getMessage());
                }
            %>
        

              <br> jawaban : <input type = "text" name ="jawaban5" size="70"></br>
                    
        <tr>


        </tr>
        <input type="submit" value="Selesai">
    </form>
<body>
</body>
</body>
</html>